Help - Search - Members - Calendar
Full Version: Tutorials: Waypointing for RCBot2 - Team Fortress 2
RCBot Forums > Waypoints > RCBot 2 Waypoints
Geralt
Written for:
RCBot Version 0.4.3

Last Updated:
29th June 2009



Tutorial 1 - Basics:


1) First make sure you have RCBot installed correctly. Once at the main menu of TF2, you will of course need to load the plugin in the console with the plugin_load "..\bin\HPB_Bot2" command.

2) Open the map you wish to make custom waypoints for.

3) To make waypoints appear, you need to type these 2 commands into the console:
  • rcbot waypoint on
  • rcbot pathwaypoint on
4) So, the first thing you will be needing to do is add a waypoint to start with. I recommend binding the add/delete waypoint commands to F1 and F2. To do this, open up the console and type:
  • bind f1 "rcbot waypoint add"
  • bind f2 "rcbot waypoint delete"
This will now allow you to simply press F1 to add a waypoint where ever you wish, instead of having to type the command into the console each time you wish to add or remove a waypoint.

5) Now that we are prepared, its time to start adding waypoints. For this tutorial, we are going to be waypointing on the level cp_granary (included with the game). So, load up the level and choose any team and any class (I usually choose blue team to start with, and a spy).

So, let's start by placing our first waypoint with the F1 key. Simply stand somewhere, press F1 and you will see a blue line like this appear below your character:

IPB Image

Now, move a few steps forward and press F1 again. You will see another waypoint appear, and if you stand your character over either one of the waypoints then a white line will appear, connecting the two waypoints together. That white line is what the bot will follow. The white line looks like so:

IPB Image

6) So, you could waypoint a whole level with just this knowledge... but, this could get messy.

Look at the diagram I have drawn below.

A -- -- -- B
|
|
|
C

Say we want the white lines to go from A to B, but not from A to C. If you want to remove the white line between A and C, all you need to do is hover over waypoint A and type this into console:
  • rcbot pathwaypoint remove1
Then, move to waypoint C and type:
  • rcbot pathwaypoint remove2
This will remove the white line between A and C. I recommend binding remove1 to F11, and remove2 to F12. Same thing applies for if you want to create a white line between two waypoints, only you would use the 'rcbot pathwaypoint create1' & 'rcbot pathwaypoint create1' commands instead.

If you are confused with the diagrams, this should clear some things up:

- We are looking at waypoints from above.
- The letters (A,B,C) are waypoints (The blue lines we talked about earlier).
- The dotted lines (----------) are the white lines which run between waypoints.

7) The final thing to do, would be to save our progress. We wouldn't want to waypoint a level and come back later, just to see that you didn't save it! To save the waypoints, use the console command 'rcbot waypoint save'.

So, you now know the very basics of waypointing - be on the lookout for future tutorials.

Note: I can't help but remind you to bind commands to keys! This will save a lot of time!




Tutorial 2 - Cleaning Waypoints:


1) Cleaning waypoints. You probably hate the sound of it already, much like when your parents tell you to clean your room. But, it's best if this gets done!

2) What do I mean by cleaning? Well, take a look at the following picture:

IPB Image

Notice how the path from waypoint C is not only going to B, but right on through B into A? Well, that is not needed at all. That may just increase CPU usage, so we may as well remove it. To remove the white line between C and A, all you need to do is hover over waypoint C and type this into console:
  • rcbot pathwaypoint remove1
Then, move to waypoint A and type:
  • rcbot pathwaypoint remove2
This will remove the white line between C and A. And it will now look like so:

IPB Image

Once you reach A and hover over it, you will notice that there is also a line running from A to B, and from A to C. You will also need to remove the white line from A to C. You should do this with all of your waypoints. Not only for cleanness, but to help the people with not-so-good CPU's. And it may even help the bots so they don't get confused.

3) If you accidentally remove a white line that you don't mean to, and want to create it again, you would use the 'rcbot pathwaypoint create1' & 'rcbot pathwaypoint create1' commands instead.

4) Once you have finished waypointing your map, there will be a LOT of these problems that need to be cleaned. Please clean your waypoints! It may take a while, but it's for the better!




Tutorial 3 - Health & Ammo Waypoint Types:


1) Now that we know the basics of waypointing, we will need to add different types of waypoints. We will start with ammo and health waypoints.

2) Once you have loaded up a level, with the plugin loaded also, find an ammo box lying on the ground somewhere. It will look like so:

IPB Image

Walk on top of the ammo box, and press F1 to add a waypoint (That's if you have binded 'rcbot waypoint add' to F1.) You should see the blue waypoint appear on top of the ammo box. Now to change its type to an ammo pickup; hover over the newly added waypoint, open the console and type 'rcbot waypoint givetype ammo'. You will see the color of the waypoint change, this indicates that the waypoint has a type given to it.

This waypoint will now enable bots to collect ammo from the ammo boxes that are laying around the level.

3) You can do a similar thing for the health bottles that are spread throughout the levels. They look like so:

IPB Image

Now we add a health type, similar to what we did with the ammo box. Open up the console and type 'rcbot waypoint givetype health'. This will enable the bots to pick up health from this waypoint.

4) Now the bots will be able to pick up health and ammo. Remember, you need to do this to every single ammo box and health bottle that you find around the level.

5) The last thing to do is to give the resupply lockers their type. The resupply lockers I am talking about, are these:

IPB Image

Those are usually found at a teams spawn. Simply place a waypoint in front of the locker, and give them a resupply type with the command 'rcbot waypoint givetype resupply'. You do not need to give them the ammo and health types!

6) Two more things before the end of the tutorial:
  • Firstly, it is possible to add more than one type to each waypoint.
  • Secondly, you can also add a 'rcbot waypoint givetype noredteam' or 'rcbot waypoint givetype noblueteam' if you don't want the other team to use a certain waypoint (The resupply ones).
7) Now your bots will be able to run around levels and pick up ammo and health when needed.




Tutorial 3.1 - Blue & Red Bases:


1) What sometimes happens. is the red bots will try and get into the blue base (or vice-versa) by running against a door, but it's impossible for the bots to get in!

2) To prevent this, simply give all the waypoints within the bases, a noredteam or noblueteam type so the bots cannot enter:
  • rcbot waypoint givetype noredteam
  • rcbot waypoint givetype noblueteam
3) So, in the red base, you would givetype noblueteam to all the waypoints within. same applies for the blue base.



Tutorial 4 - Sniper Waypoint Types:


1) Now to make your waypointed maps a little more advanced. This time, we will be adding spots for snipers to snipe from...

2) To start off, find a suitable place for a sniper. Once you have found a good sniping position, place a waypoint down and open up the console. While the console is open, type 'rcbot waypoint givetype sniper'. You will see the waypoint change color, indicating that the waypoint has a type applied to it.

Note: If you need to see what types a certain waypoint has, then stand over it and type 'rcbot waypoint info' into the console.

3) What you must not forget is that most/all maps in TF2 have two sides - blue and red. If you place sniper points for the blue team to use, the red team will also use them... which means at the beginning of a round one of the red team snipers could run straight to one of the blue teams sniper waypoints. To stop this, use the command 'rcbot waypoint givetype noredteam' or 'rcbot waypoint givetype noblueteam' on the appropriate sniper waypoints to stop the other team using them.

4) This is all it takes to make sniper waypoints. Remember to only place the sniper waypoints in logical positions, it wouldn't be wise to place a sniper position at one of the teams spawn.




Tutorial 5 - Sentry Waypoint Types:


1) Now lets add some sentry points around your map.

2) To start off, place a waypoint where you would like the bot to build a sentry. Try not to place the waypoint too close to a wall or edge of bridge, etc. Try to place them in good positions, but not adding too many.

3) Once you have the waypoint in position, open up the console and use the command 'rcbot waypoint givetype sentry'. This will now allow the bots to build a sentry in this position.

4) If you put sentry's in the Blue Base, for example, it's best to also add the command 'rcbot waypoint givetype noredteam' onto it so the Red Team cannot build sentry's there. This also applies for the Red Base.

5) That's the end of this tutorial. Remember; don't place the sentry's too close to walls and edges, otherwise the bots will not build them, and the bots just often stand there while not being able to place a sentry.

Note: The actual waypoint you see is where the engineer will be standing! Not where the Sentry gets placed.



Tutorial 6 - Teleport Waypoint Types:


Coming Soon - Keep an eye out for updates!
wyn10
Can you please finish this?

I'm working on 2 map's and I don't know how to add teleport's.
Fillmore
QUOTE(wyn10 @ Jul 27 2009, 07:48 PM) *

Can you please finish this?

I'm working on 2 map's and I don't know how to add teleport's.

add 'teleentrance' type to a waypoint you want the engie bots to make a entrance,and put 'teleexit' on a waypoint where you want them to make a exit.
Geralt
Exactly what Fillmore said. I'll get around to finishing it sometime, it's just I'm pretty busy at the moment.
wyn10
Are dispensor's supported?

I'm working on a map that doesn't have any health or ammo spot's.
Geralt
Engineers automatically build dispensers near their sentry guns - so all you need to place are sentry waypoints for that.
Fillmore
They should add a 'dispenser' type.
Just in case people want the bot to put the dispenser near the fight.
Or just place sentry spots there,and the engies will do the rest.
OctoberCat
Okay, I know it's off topic, but I just want to say: Great Job! Thanks for this awesome tutorial and thanks to everyone for giving RCbot to the community. TF2 has needed this for a long time, and I look forward to waypointing my rats maps.

Yes, this rocks. biggrin.gif
JohnnyAxe
Cheers Geralt.
ickle
looks like a nice and straightforward tut ....only trouble is when i put rcbotd pathwaypoint on in console it crashes my server :S rcbot pathwaypoint on comes up with Unknown command "rcbot"

any clues on why this would be and how it can be fixed ? have to do rcbotd waypoint on aswell rather than rcbot waypoint on

Thanks biggrin.gif
Cheeseh
QUOTE(ickle @ Sep 10 2009, 12:06 AM) *

looks like a nice and straightforward tut ....only trouble is when i put rcbotd pathwaypoint on in console it crashes my server :S rcbot pathwaypoint on comes up with Unknown command "rcbot"

any clues on why this would be and how it can be fixed ? have to do rcbotd waypoint on aswell rather than rcbot waypoint on

Thanks biggrin.gif


you can only waypoint as a host in listenservers. rcbotd will crash because it requires client commands to show waypoints.
SonicKun
is there somethin for class only waypoint? like, in 2fort i want the spy goes in the water and others on the bridge, is this possible?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.